<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="shop.asp" -->
<!-- 
    METADATA 
    TYPE="typelib" 
    UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"  
    NAME="CDO for Windows 2000 Library" 
-->  
<%


  Dim objRS
  set objRS=Server.CreateObject("ADODB.Recordset")

  objRS.ActiveConnection=shop_STRING

  objRS.Source="tblUsers"
  objRS.CursorType=0
  objRS.CursorLocation=2
  objRS.LockType=3
  objRS.Open

	objRS.Addnew
	objRS("FirstName")= Request.Form("firstname")
	objRS("LastName")= Request.Form("lastname")
	objRS("Email")= Request.Form("email")
	objRS("Phone")= Request.Form("phone")
	objRS("StreetNum")= Request.Form("stnum")
	objRS("StreetName")= Request.Form("stname")
	objRS("Suburb")= Request.Form("sub")
	objRS("Postcode")= Request.Form("pc")
	objRS("Password")= Request.Form("password")



Dim objMessage
Dim objConfig
Dim Fields


Set objConfig = CreateObject("CDO.Configuration")
Set Fields = objConfig.Fields

With objConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "smtp.science.mq.edu.au"
.Item(cdoSMTPServerPort) = 25

.Update
End With



Set objMessage = CreateObject("CDO.Message")
Set objMessage.Configuration = objConfig

With objMessage
.To = Request.Form("email")
.From = "<kb_xtc@yahoo.com>"
.Subject = "Starlight Registration"
.HtmlBody = "Thank you for regestering with stralight" &Request.Form("firstname") & " " &Request.Form("lastname") & " Your Username is " &Request.Form("email")
.Send
End With

objRS.Update
 Set objMessage = Nothing
 Set config = Nothing
 Set Field = Nothing

  

  objRS.Close
  set objRS= nothing
  
  
  
%>

<HTML>
<BODY>
<TITLE><HEAD>
Registered User!
</HEAD></TITLE>
<div align = "center">
<H1>MQ-ONLINE</H1>
</div>
<div align ="left">
<H4> ISYS254 ASSIGNMENT 2 2011</H4>
</div>
<div align = "right">
<H4> AUTHOR: KARAN BAGARIA(41224167)</H4>
</div>
<div align = "center">
<H2 ID="txt1">Thank You for regestering with MQ-ONLINE!</H2>
<H4>An email has been sent to you.</H4>
<a href="http://www.webng.com/kbxtc/login.asp" >LOGIN NOW!</a>
</div>
</BODY>

</HTML>
